package com.spboot.service.impl;

import com.spboot.entity.Address;
import com.spboot.mapper.AddressMapper;
import com.spboot.service.AddressService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author guocb
 * @since 2020-04-27
 */
@Service
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements AddressService {

    @Override
    public List<Address> saddress(Integer userid) {
        return this.baseMapper.saddress(userid);
    }

    @Override
    public int updateaddress(String contacts, String phone, String address, Integer addressid) {
        return this.baseMapper.updateaddress(contacts, phone, address, addressid);
    }

    @Override
    public int insertaddress(String address, Integer userid, String contacts, String phone) {
        return this.baseMapper.insertaddress(address, userid, contacts, phone);
    }

    @Override
    public int deleteaddress(Integer addressid) {
        return this.baseMapper.deleteaddress(addressid);
    }
}
